package com.zhousb.deviceManager.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhousb.deviceManager.model.bo.ProductBo;
import com.zhousb.deviceManager.model.entity.ImProduct;
import com.zhousb.deviceManager.model.enums.ProductLogOperationEnum;
import com.zhousb.deviceManager.model.so.ProductLogSo;
import com.zhousb.deviceManager.model.so.ProductSo;
import com.zhousb.deviceManager.model.so.SimpleSo;
import com.zhousb.deviceManager.model.vo.ProductLogVo;
import com.zhousb.deviceManager.model.vo.ProductPriceVo;
import com.zhousb.deviceManager.model.vo.ProductVo;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

public interface ProductService {

    IPage<ProductVo> page(Page<ImProduct> page, ProductSo so);
    IPage<ProductPriceVo> pricePage(Page<ImProduct> page, ProductSo so);

    void updateStoreNum(Long orderId, Long productId, Integer quantity, ProductLogOperationEnum operation);

    boolean create(ProductBo bo);
    boolean update(ProductBo bo);
    boolean delete(String productId);
    IPage<ProductLogVo> log(Page page, ProductLogSo so);

    void export(ProductSo so, HttpServletResponse response) throws IOException;

    boolean watch(String productId);
    boolean unwatch(String productId);
    ProductPriceVo current(String productId);
}
